package com.gz.springboot.bean;

import lombok.Data;
import lombok.ToString;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@ToString
@Slf4j
//注意，如果既有application.properties还有application.yml
//application.properties优先级高
//开发中尽量避免application.properties和application.yml同时存在
@ConfigurationProperties(prefix = "furn")
@Component //或者把@Component注解掉，在任意一个BeanConfig中设置@EnableConfigurationProperties(Furn.class)
@Data
public class Furn {
    private int id;
    private String name;
    private double price;
    private Monster monster;
    private String[] desc;
}
